﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Plain.Demo.Blog.Business.Post>" MasterPageFile="~/Layout/OneColumn.master" ValidateRequest="false" %>
<asp:Content id="ctnHead" runat="server" ContentPlaceHolderID="Head">
<script type="text/javascript"> 
	$().ready(function() {
		$("#Published").date_input();

		$('#Content').tinymce({
			// Location of TinyMCE script
			script_url : '/Scripts/tiny_mce/tiny_mce.js',
 
			// General options
			theme : "advanced",
			skin : "o2k7",
			plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",
 
			// Theme options
			theme_advanced_buttons1 : "bold,italic,underline,|,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,link,unlink,anchor,|,image,media,|,cleanup,code,fullscreen",
			theme_advanced_buttons2 : "",
			theme_advanced_buttons3 : "",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,
 
			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js"
		});
	});
</script>
</asp:Content>
<asp:Content id="ctnSingleColumn" runat="server" ContentPlaceHolderID="SingleColumn">
	<ul id="Panel">
    	<li><%= Html.ActionLink("Posts","Index","Post") %></li>
    	<li><%= Html.ActionLink("About me","Edit","User", new { id=1 },null) %></li>
    	<li class="Header">Create post</li>
    </ul>
	<%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %> 
	<% using (Html.BeginForm() ) {%> 
		<p> 
			<br/>
			<label for="Title">Title:</label> 
			<%= Html.TextBox("Title") %> 
			<%= Html.ValidationMessage("Title", "*") %> <br/><br/>
		</p> 
		<p>
			<%= Html.TextBox("Content") %> 
			<%= Html.ValidationMessage("Content", "*") %> 
		</p>
		<p>
			<br/>
			<label for="Tags">Tags:</label> 
			<%= Html.TextBox("Tags") %>
			<%= Html.ValidationMessage("Tags", "*") %>
		</p> 
		<p class="Buttons"> 
			<br/>
			<input type="submit" name="submitButton" value="Create" />
			<input type="submit" name="submitButton" value="Publish" />
			<input type="text" name="Published" id="Published" />
			<input type="submit" name="submitButton" value="Schedule" />
		</p> 
	<% } %> 
</asp:Content>  